import 'package:cross_ecommerce_app/request/RequestForm.dart';
import 'request/ServiceAccessSubmit.dart';
import 'request/ServiceAccessSelect.dart';
import 'package:flutter/material.dart';
import 'request/GetWayBillInfo.dart';
import 'request/GetOrderInfo.dart';
import 'request/SaveApplyService.dart';

class SettingsPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: '设置',
      home: Scaffold(
        appBar: AppBar(
          backgroundColor: Colors.blueGrey,
          title: Text('设置'),
        ),
        body: ListView(
          children: <Widget>[
            ElevatedButton(
              onPressed: () async{
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (context) => RequestForm()),
                );
              },
              child: Text('公共上传文件'),
            ),
            ElevatedButton(
              onPressed: () async{
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (context) => ServiceAccessSubmit()),
                );
              },
              child: Text('出口业务接入-提交'),
            ),
            ElevatedButton(
              onPressed: () async{
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (context) => ServiceAccessSelect()),
                );
              },
              child: Text('出口业务接入-查询'),
            ),
            ElevatedButton(
              onPressed: () async{
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (context) => SaveApplyService()),
                );
              },
              child: Text('出口业务协同-单证传输'),
            ),
            ElevatedButton(
              onPressed: () {
                havenot(context);
              },
              child: Text('出口业务协同单证传输'),
            ),
            ElevatedButton(
              onPressed: () async{
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (context) => GetWayBillInfo()),
                );
              },
              child: Text('出口业务轨迹查询'),
            ),
            ElevatedButton(
              onPressed: () async{
                Navigator.push(
                  context,
                  MaterialPageRoute(builder: (context) => GetOrderInfo()),
                );
              },
              child: Text('出口订单信息获取'),
            ),
            ElevatedButton(
              onPressed: () {
                havenot(context);
              },
              child: Text('出口商品信息获取'),
            ),
          ],
        ),
      ),
    );
  }

  void havenot(BuildContext context) {
    showDialog(
      context: context,
      builder: (BuildContext context) {
        return AlertDialog(
          title: Text('提示'),
          content: Text('暂不支持'),
          actions: <Widget>[
            TextButton(
              child: Text('确定'),
              onPressed: () {
                Navigator.of(context).pop();
              },
            ),
          ],
        );
      },
    );
  }
}
